extends Node
#数值类
class_name Numeral

var w_base=W.w(10)
var w_extra=W.w(0)
var w_extra_percent=W.w(1.0)
var w_buff=W.w(0)
var w_buff_percent=W.w(1.0)
var w_value=W.w2(self,'_wfn_value')
var value setget ,get_value

func _init(v):
	w_base.value=v

func _wfn_value():
	var res=w_base.value+w_extra.value
	res*=clamp(w_extra_percent.value,0.01,100)
	res+=w_buff.value
	res*=clamp(w_buff_percent.value,0.01,100)
	res=int(res)
	return res

func get_value():
	return w_value.value

func dispose():
	var arr=[w_base,w_extra,w_extra_percent,w_buff,w_buff_percent,w_value]
	for w in arr:
		w.dispose()
